//
//  AnimationViewModel.m
//  DebugDemo
//
//  Created by XFB on 2019/1/7.
//  Copyright © 2019年 ZhouCheng. All rights reserved.
//

#import "AnimationViewModel.h"

@implementation AnimationViewModel

- (instancetype)initWithAnimation:(Animation *)animation
{
    self = [super init];
    if (self) {
        self.animation = animation;
    }
    return self;
}

- (void)setGreeting:(NSString *)greeting
{
    _greeting = greeting;
    if (self.changeBlock) {
        self.changeBlock(self);
    }
}

- (void)showGreeting
{
    self.greeting = [NSString stringWithFormat:@"你好，%@!", self.animation.name];
}

@end
